Carbon


ThreadTerminationProcPtr

Header: Threads.h Carbon status: Supported

Defines a pointer to a thread termination callback function. Your thread termination callback function does additional cleanup when the code in a thread finishes executing.

typedef void(* ThreadTerminationProcPtr) (
    ThreadID threadTerminated, 
    void *terminationProcParam
);

You would declare your function like this if you were to name it MyThreadTerminationCallback:

void MyThreadTerminationCallback (
    ThreadID threadTerminated, 
    void *terminationProcParam
);
Parameter descriptions
threadTerminated

The thread ID of the thread being disposed of.

terminationProcParam

A pointer to a void data structure that the SetThreadTerminator function passes to MyThreadTerminationCallback.

DISCUSSION

You use the SetThreadTerminator function to install the MyThreadTerminationCallback custom termination function. The custom termination function allows you to do additional cleanup when the code in a thread finishes executing or when you call the DisposeThread function to manually dispose of a thread.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)